﻿#pragma once

#include <Windows.h>
#include <wrl.h>
#include <d3d11.h>
#include "DxgiInfoManager.h"


// 使用模板别名(C++11)简化类型名
template <class T>
using ComPtr = Microsoft::WRL::ComPtr<T>;

class Graphics
{

public:
	Graphics(HWND hWnd);
	~Graphics() = default;

#ifndef NDEBUG
	DxgiInfoManager m_DebugInfoManager;
#endif // !NDEBUG


	void ClearBuffer(float red, float green, float blue);
	void TestDrawTriangle();
	void EndFrame();

private:

	ComPtr<ID3D11Device> m_Device;
	ComPtr<IDXGISwapChain> m_SwapChain;
	ComPtr<ID3D11DeviceContext> m_Context;
	ComPtr<ID3D11RenderTargetView> m_Target;
	ComPtr<ID3D11DepthStencilView> m_DSV;
};

